package com.flyduck.mapper;

import com.flyduck.domain.SysDept;
import com.flyduck.vo.QueryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysDeptMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysDept record);

    int insertSelective(SysDept record);

    SysDept selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysDept record);

    int updateByPrimaryKey(SysDept record);

    /**
     * 查询所有的部门
     * @return
     */
    List<SysDept> findList(@Param("keyword") String keyword);

    /**
     * 根据父id查询所有
     * @param pid
     * @return
     */
    List<SysDept> findAllByPid(@Param("pid") Long pid);
}